package org.myorg.v4;

public class F41 extends Fc4 {
	
	double low = -1;
	double high = 1;

	public double org_value(Gene4 ps) {
		FGene4 gene = (FGene4)ps;
		//double x = (high - low)*gene.geneAt(0) + low;
		//double tmp = (Math.PI + 100)*x/100 - 100;

		double tem = Long.parseLong(gene.gene, 2);
		double scope = Math.pow(2, gene.length) - 1;
		double x = tem/scope;

		return fc(x);
		
	}
	

	public double fc(double scope) {
		
		double x = (high - low)*scope + low;
		double y = x*x;
		
		return y;
	}

}
